const Layout = () => import('@/layout/index.vue')
export const constantRoutes = [
  {
    //任意路由
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'DataLine'
    }
  },
  {
    path: '/404',
    component: () => import('@/view/404/404.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
      icon: 'User'
    }
  },
  {
    path: '/login',
    component: () => import('@/view/login/index.vue'),
    name: 'login',
    meta: {
      hidden: true,
      title: 'login',
      icon: 'User'
    }
  },
  {
    path: '/',
    component: Layout,
    name: 'layout',
    meta: {
      title: '',
      icon: 'HomeFilled'
    },
    // redirect: '/index',
    children: [
      {
        path: '/home',
        name: 'Home',
        meta: {
          title: '首页',
          icon: 'HomeFilled'
        },
        component: () => import('@/view/wel.vue')
      }
    ]
  },
  {
    path: '/screen',
    name: 'Screen',
    meta: {
      hidden: false,
      title: '数据大屏',
      icon: 'User'
    },
    component: () => import('@/view/screen/index.vue')
  },
  {
    path: '/acl',
    name: 'Acl',
    meta: {
      title: '权限管理',
      icon: 'Lock'
    },
    component: Layout,
    children: [
      {
        path: '/acl/user',
        component: () => import('@/view/acl/user/index.vue'),
        name: 'User',
        meta: {
          title: '用户管理',
          icon: 'User'
        }
      },
      {
        path: '/acl/role',
        component: () => import('@/view/acl/role/index.vue'),
        name: 'Role',
        meta: {
          title: '角色管理',
          icon: 'UserFilled'
        }
      },
      {
        path: '/acl/permission',
        component: () => import('@/view/acl/permission/index.vue'),
        name: 'Permission',
        meta: {
          title: '菜单管理',
          icon: 'Monitor'
        }
      },
      {
        path: '/acl/test',
        component: () => import('@/view/acl/test/index.vue'),
        name: 'Test',
        meta: {
          title: '测试页面',
          icon: 'Monitor'
        }
      }
    ]
  }
]
